<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="https://ajax4jsf.dev.java.net/ajax"%>
<%@taglib prefix="r" uri="http://richfaces.org/rich"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%> 
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
        <style type="text/css">@import url("../../css/style.css");</style>
    </head>
    <body>
        <div align="center">
            <f:view>
                <table width="735" border="0" align="center">
                    <tr>
                        <td width="730" height="30" background="/Eventime/jsp/imagens/barra-cadastro-cursos.jpg" class="style1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cadastro de Cursos</td>
                    </tr>
                    <tr class="style2">
                        <td>
                            <h:form id="form">
                                <table width="735" border="0" align="center">
                                    <tr>
                                        <td height="32" colspan="4">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="32" colspan="6" align="center">
                                            <h:messages infoClass="sucesso" errorClass="erro"/>
                                            <h:panelGrid columns="2">
                                                <h:outputLabel styleClass="style2" value="Nome"/>
                                                <h:panelGroup>
                                                    <h:inputText styleClass="border" value="#{CursoBean.cursos.nome}" required="true" requiredMessage="#{msgs.nomeCurso}"/>
                                                </h:panelGroup>
                                                <h:outputLabel styleClass="style2" value="Nº de Vagas"/>
                                                <h:inputText styleClass="border" value="#{CursoBean.cursos.numeroVagas}" required="true" requiredMessage="#{msgs.numeroVagas}"/>
                                                <h:outputLabel styleClass="style2" value="Data do Curso"/>
                                                <r:calendar inputClass="border" datePattern="dd/MM/yyyy" value="#{CursoBean.cursos.dataCurso}" required="true" requiredMessage="#{msgs.dataCurso}"/>
                                                <h:outputLabel styleClass="style2" value="Hora Inicial"/>
                                                <h:inputText styleClass="border" value="#{CursoBean.cursos.horaInicial}"/>
                                                <h:outputLabel styleClass="style2" value="Hora Final"/>
                                                <h:inputText styleClass="border" value="#{CursoBean.cursos.horaFinal}"/>
                                            </h:panelGrid>
                                            <div align="center">
                                                <br>
                                                <h:commandButton image="/jsp/imagens/button-salvar.png" action="#{CursoBean.gravarCurso}"/>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">&nbsp;</td>
                                    </tr>
                                </table>
                            </h:form>
                        </td>
                    </tr>
                </table>
            </f:view>
        </div>
    </body>
</html>